public class FindDiv {
    public static void main(String[] args) {
        int dividend = 35;
        int divisor = 9;

        int foundCount = 0;
        int toBeFound = 5;
        for (int i = 0; i < 100 && toBeFound > foundCount; i++) {
            if (dividend % divisor == 0) {
                System.out.println(dividend + "可以整除" + divisor + "。商为" + dividend / divisor);
                foundCount++;
            }
            dividend++;
        }
        System.out.println("总共找到" + foundCount + "个可以整除" + divisor + "的数。");
    /*
        for(int i=0;i<= 30 ; i++){
            System.out.println(dividend + "可以整除" + divisor + "吗？" + ((dividend++) % divisor == 0));
        }
     */
    /*
        if (dividend % divisor == 0) {
            System.out.println(dividend + "可以整除" + divisor + "。商为" + (dividend / divisor));
        }
        dividend++;
    */
    }
}
